package com.olinsports.system.olinsportssystem.controller;

import com.olinsports.system.olinsportssystem.manager.StmUsrManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by Administrator on 2017/7/22.
 */
@Controller
public class LoginController {
    @Autowired
    private StmUsrManager stmUsrManager;


    @GetMapping("/")
    public String loginPage() {
        return "login";
    }

    @RequestMapping("/login")
    public String loginPage(String usrName, String password,ModelMap modelMap){

      return stmUsrManager.singIn(usrName,password,modelMap);
    }
}
